/**
 * Created with IntelliJ IDEA.
 * Description:
 * user:likai
 * Date:2022-10-11
 * Time:10:39
 */
class Food{

}
class Fruit extends Food{

}
class Apple extends Fruit{

}
class Banana extends Fruit{

}
class Meet extends Food{

}
class Plate<T>{

}
public class Test {


    public static void main(String[] args) {
        Integer a=10;
        int b=a.intValue();

    }
    public  static <T> void fun(Plate<? extends Fruit> ret){

    }
    public static <T>void func(Plate<?super Fruit> ret){

    }
    public static void main1(String[] args) {
        Apple apple=new Apple();
        Banana banana=new Banana();
        //extends
        Plate<Apple> applePlate=new Plate<>();
        Plate<Banana> bananaPlate=new Plate<>();
        Plate<Meet> meetPlate=new Plate<>();
        Plate<Fruit> fruitPlate=new Plate<>();
        fun(applePlate);
        //通配符是Furit的子类，meetPlate不是Fruit的子类
        //fun(meetPlate);
        fun(fruitPlate);

        //super
        //只能上传他的父类和它本身，不能上传他的子类
        //func(bananaPlate);
        Plate<Food> foodPlated=new Plate<>();
        func(foodPlated);
        func(fruitPlate);
    }
}
